import { PureComponent } from 'react'

function addAge(Target: Function) {
  Target.prototype.age = 30
}

// 测试装饰器语法糖
@addAge
class TestDecorator extends PureComponent {
  age?: number

  render() {
    return <h2>我的年龄是{this.age}岁</h2>
  }
}

export default TestDecorator
